<template>
  <div>
               <van-field v-model='form.name' label='名称' />
               <van-field v-model='form.parameyer' label='参数' />
               <van-button type="default">+</van-button>
               <van-button type="default">提交</van-button>
      <table border=1 cellspacing=0>
          <tr>
              <td>id</td>
              <td>名称</td>
              <td>参数</td>
          </tr>
          <tr v-for="i in glit ">
              <td>{{i.id}}</td>
              <td>{{i.name}}</td>
              <td>{{i.parameyer}}</td>
          </tr>
      </table>
  </div>
</template>

<script>
export default {
    data(){
        return{
            glit :'',
            form:{}
        }
    },
  methods: {
    add() {
      this.axios.post('/test', this.form).then(res => {
        console.log(res)
      })
    },
    getlist() {
      this.axios.get('/test').then(res => {
        this.glit  = res.data.list
        this.getlist()
      })
    }
  },

  mounted() {
    this.getlist()
  }
}
</script>

<style>

</style>